<template>
  <div id="adminView">
    <MdEditor :value="mdValue" :handle-change="onMdChange" />
    <CodeEditor
      :value="codeValue.code"
      :language="codeValue.language"
      :handle-change="onCodeChange"
    />
  </div>
</template>

<script setup lang="ts">
import { ref } from "vue";
import MdEditor from "@/components/MdEditor.vue";
import CodeEditor from "@/components/CodeEditor.vue";

const codeValue = ref({
  language: "java",
  code: "",
});
const mdValue = ref();
const onMdChange = (v: string) => {
  mdValue.value = v;
  console.log(v);
};

const onCodeChange = (v: string) => {
  codeValue.value.code = v;
  console.log(v);
};
</script>

<style scoped></style>
